package pack3;

public class Undergraduate extends Student{
    private String zy;

    public Undergraduate(String name, String sex, int years, String xh, String zy) {
        super(name, sex, years, xh);
        this.zy = zy;
    }

    public Undergraduate() {
        super();
        this.zy = "";
    }

    public String getZy() {
        return zy;
    }

    public void setZy(String zy) {
        this.zy = zy;
    }

    @Override
    public String toString() {
        return "Undergraduate{" +
                "name='" + getName() + '\'' +
                ",xh='" + getXh() + '\'' +
                ",zy='" + getZy() + '\'' +
                ", sex='" + sex + '\'' +
                ", years=" + getYears() +
                '}';
    }
}
